package br.perfiman.faces;

import br.perfiman.model.Category;
import br.perfiman.service.AbstractService;
import br.perfiman.service.CategoryService;
import br.perfiman.utils.ServiceLocator;

public class CategoryBean extends AbstractBean<Category> {

	public CategoryBean() throws Exception {
		super();
		if(getEntity() == null)
			setEntity(new Category());
		retrieveAll();
	}

	@Override
	protected AbstractService<Category> getService() throws Exception {
		if(service == null){
			service = (CategoryService) ServiceLocator.getInstance().get("CategoryServiceBean/remote");
		}
		return service;
	}
}
